package com.prd.feign;

import com.prd.util.JsonData;
import com.prd.vo.OaDepartmentDescVo;
import com.prd.vo.OaDepartmentPostDescVo;
import com.prd.vo.OaDeptmentPositionDescVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author lizhaoyi
 * @date 2024/1/28 11:21
 * Description:
 */

@FeignClient(name = "prd-manage")
public interface SysDeptFeignService {


    /**
     * 部门组织列表
     * @return
     */
    @GetMapping("/api/sysDept/selectList")
    JsonData selectList();

    /**
     * 根据id获取部门职责书
     * @param id
     * @return
     */
    @GetMapping("/api/sysDepartmentLetter/{id}")
    JsonData getDeptDescById(@PathVariable("id") Long id);


    /**
     * 根据部门id获取职务列表
     * @param id
     * @return
     */
    @GetMapping("/api/sysPosition/selectOne/{id}")
    JsonData getPositionByDeptId(@PathVariable("id") Long id);

    /**
     * 根据id获取职务说明书
     * @param id
     * @return
     */
    @GetMapping("/api/sysPositionDescribe/{id}")
    JsonData getPositionDescById(@PathVariable("id") Long id);

    /**
     * 根据职务id获取岗位列表
     * @param id
     * @return
     */
    @GetMapping("/api/sysPost")
    JsonData getPostByPositionId(@PathVariable("id") Long id);


    /**
     * 根据id获取岗位说明书
     * @param id
     * @return
     */
    @GetMapping("/api/sysJobDescription/{id}")
    JsonData getPostDescById(@PathVariable("id") Long id);

    /**
     * 修改部门责任书
     * @param descVo
     * @return
     */
    @PostMapping("edit")
    JsonData editDeptDesc(@RequestBody OaDepartmentDescVo descVo);

    /**
     * 修改职务说明书
     * @param positionDescVo
     * @return
     */
    @PutMapping("/api/sysPositionDescribe")
    JsonData editPositionDesc(@RequestBody OaDeptmentPositionDescVo positionDescVo);

    /**
     * 修改岗位说明书
     * @param postDescVo
     * @return
     */
    @PostMapping("/api/sysJobDescription/edit")
    JsonData editPostDesc(@RequestBody OaDepartmentPostDescVo postDescVo);
}
